define(['module', 'react', './BaseDemo', 'Notification', 'Button', 'FontIcon', "./Tile"], function (module, React, BaseDemo, notification, Button, FontIcon, Tile) {
    'use strict';

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var TabPage = function (_BaseDemo) {
        _inherits(TabPage, _BaseDemo);

        function TabPage() {
            _classCallCheck(this, TabPage);

            return _possibleConstructorReturn(this, Object.getPrototypeOf(TabPage).apply(this, arguments));
        }

        _createClass(TabPage, [{
            key: 'openNotification',
            value: function openNotification() {
                notification.open({
                    title: "Notification Title",
                    desc: "I will never close automatically. I will be close automatically. I will never close automatically."
                });
            }
        }, {
            key: 'openNotification2',
            value: function openNotification2() {
                notification.open({
                    title: "Notification Title",
                    desc: "I will never close automatically. I will be close automatically. I will never close automatically.",
                    icon: React.createElement(FontIcon, { icon: 'coffee' }),
                    duration: 0
                });
            }
        }, {
            key: 'openNotification3',
            value: function openNotification3() {
                notification.success({
                    title: "Notification Title",
                    desc: "I will never close automatically. I will be close automatically. I will never close automatically.",
                    duration: 0
                });

                notification.info({
                    title: "Notification Title",
                    desc: "I will never close automatically. I will be close automatically. I will never close automatically.",
                    duration: 0
                });

                notification.warning({
                    title: "Notification Title",
                    desc: "I will never close automatically. I will be close automatically. I will never close automatically.",
                    duration: 0
                });

                notification.error({
                    title: "Notification Title",
                    desc: "I will never close automatically. I will be close automatically. I will never close automatically.",
                    duration: 0
                });

                notification.question({
                    title: "Notification Title",
                    desc: "I will never close automatically. I will be close automatically. I will never close automatically.",
                    duration: 0
                });
            }
        }, {
            key: 'openNotification4',
            value: function openNotification4() {
                notification.success({
                    title: "Notification Title",
                    desc: "I will never close automatically. I will be close automatically. I will never close automatically.",
                    duration: 0,
                    dock: notification.DOCK.BOTTOMRIGHT
                });
            }
        }, {
            key: 'openNotification5',
            value: function openNotification5() {
                notification.info({
                    title: "Notification Title",
                    desc: "I will never close automatically. I will be close automatically. I will never close automatically.",
                    duration: 0,
                    dock: notification.DOCK.BOTTOMLEFT
                });
            }
        }, {
            key: 'openNotification6',
            value: function openNotification6() {
                notification.info({
                    title: "Notification Title",
                    desc: "I will never close automatically. I will be close automatically. I will never close automatically.",
                    duration: 0,
                    dock: notification.DOCK.TOPLEFT
                });
            }
        }, {
            key: 'openNotification7',
            value: function openNotification7() {
                var key = 'open' + Date.now();
                notification.info({
                    title: "Notification Title",
                    desc: "I will never close automatically. I will be close automatically. I will never close automatically.",
                    duration: 0,
                    btn: React.createElement(
                        Button,
                        { onClick: function onClick() {
                                notification.close(key);
                            }, size: 'small', theme: 'primary' },
                        'confirm'
                    ),
                    key: key,
                    onClose: function onClose() {
                        console.log('Notification was closed. Either the close button was clicked or duration time elapsed.');
                    }
                });
            }
        }, {
            key: 'render',
            value: function render() {

                return React.createElement(
                    'div',
                    { className: 'container' },
                    React.createElement(
                        Tile,
                        { header: "基本使用方式" },
                        React.createElement(
                            Button,
                            { onClick: this.openNotification.bind(this) },
                            '打开'
                        ),
                        React.createElement(
                            Button,
                            { onClick: this.openNotification2.bind(this) },
                            '打开'
                        ),
                        React.createElement('br', null),
                        React.createElement(
                            Button,
                            { onClick: this.openNotification3.bind(this) },
                            'success'
                        ),
                        React.createElement('br', null),
                        React.createElement(
                            Button,
                            { onClick: this.openNotification4.bind(this) },
                            'bottomRight'
                        ),
                        React.createElement('br', null),
                        React.createElement(
                            Button,
                            { onClick: this.openNotification5.bind(this) },
                            'bottomLeft'
                        ),
                        React.createElement('br', null),
                        React.createElement(
                            Button,
                            { onClick: this.openNotification6.bind(this) },
                            'topLeft'
                        ),
                        React.createElement('br', null),
                        React.createElement(
                            Button,
                            { onClick: this.openNotification7.bind(this) },
                            'custom btn'
                        ),
                        React.createElement('br', null)
                    )
                );
            }
        }]);

        return TabPage;
    }(BaseDemo);

    module.exports = TabPage;
});
